<?php if($_SESSION['config_template']=='layoutmain_web1') {?>
<div style="clear:both;"></div>
<!-- [start] .MostView news-sidebar // -->
<div class="top_box"><span></span></div>

<div class="box base-mini mini-cart">
	<div class="head">
		<h4><?php echo $title;?>
			<!-- Tạo cây bút chì cho click and change -->
			<div style="float: right; margin-right:10px">
			<?php if(isset($login)&& $login =="1" && isset($permission) && $permission=="true")  {?>
			<ul class="gallery clearfix">	
				<a href="/mostviewnews/clickchange?iframe=true&width=350&height=300" rel="prettyPhoto[iframe]">
					<img src="/images/Pencil.png" style="width:20px ; height:20px;margin-top:-4px;"></img>
				</a>
			</ul>
			</div>
			<?php }?>
			
			<!-- End - Tạo cây bút chì cho click and change -->
		</h4>
	</div>
	<div class="middle_box">
	
	<div class="content" style="height:auto;">

		<div class="new_detail" >
		<?php foreach ($AllMostViewNews as $MostViewNews){?>
			<div style="float:left;">
			<a href="/news/detail?id=<?php echo $MostViewNews['thing_id'];?>"><img width="55px" height="45px" src="<?php if($MostViewNews['avatar'] != null){echo $MostViewNews['avatar'];}else{echo "/images/img_thumb.gif";}?>" onerror="this.src='images/img_thumb.gif'">
			</a>
			</div>
			<div style="margin-left:58px;">
		   <a href="/news/detail?id=<?php echo $MostViewNews['thing_id'];?>" style="font-size: 11px;">
				<?php 
                    	$kt=strlen($MostViewNews['title']);
						if ($kt<=35)  
							echo $MostViewNews['title']; 
						else 
							echo substr($MostViewNews['title'], 0,35)."..";
				?>
			</a>
			<br>
			<div style="color:rgb(150,150,150); float:right;text-decoration:none;font-size: 11px;"><?php echo $textviews ?> <?php echo $MostViewNews['views']?></div>                                                                       
			</div>
			<div style="clear:both;"></div>
			<br>
		<?php }?>
		</div>
	
	</div>

	</div>
	<div class="bottom_box"><span></span></div>
</div>
<!-- [ends] .MostView-sidebar // -->
<div style="clear:both;"></div>
<?php } else if($_SESSION['config_template']=='layoutmain_web2') { ?>
<div class="top_box"><span></span></div>

<div class="box currency-switcher">
	<div class="head">
		<h4><?php echo $title;?>
			<!-- Tạo cây bút chì cho click and change -->
			<div style="float: right; margin-right:10px">
			<?php if(isset($login)&& $login =="1" && isset($permission) && $permission=="true")  {?>
			<ul class="gallery clearfix">	
				<a href="/mostviewnews/clickchange?iframe=true&width=350&height=300" rel="prettyPhoto[iframe]">
					<img src="/images/Pencil.png" style="width:20px ; height:20px;margin-top:-4px;"></img>
				</a>
			</ul>
			<?php }?>
			</div>
			<!-- End - Tạo cây bút chì cho click and change -->
		</h4>
	</div>
	<div class="content_current">
	<link rel="stylesheet" type="text/css" href="/css/web2/mostviewnews.css" />
	<div class="most_view_content" style="margin-top:0px; padding: 0px">

		<?php foreach ($AllMostViewNews as $MostViewNews){?>
		<div class="most_view_item" align="center">
			<a href="/news/detail?id=<?php echo $MostViewNews['thing_id'];?>">
				<div class="image" align="center" style="height:45px;width:55px;float:left">
					<img width="55px" height="45px" src="<?php if($MostViewNews['avatar'] != null){echo $MostViewNews['avatar'];}else{echo "/images/img_thumb.gif";}?>" onerror="this.src='images/img_thumb.gif'">
				</div>
			</a>
			<div class="new">
			   <a href="/news/detail?id=<?php echo $MostViewNews['thing_id'];?>" style="font-size: 11px;">
					<?php 
	                    	$kt=strlen($MostViewNews['title']);
							if ($kt<=35)  
								echo $MostViewNews['title']; 
							else 
								echo substr($MostViewNews['title'], 0,35)."..";
					?>
				</a>
				<br>
				<div style="color:rgb(150,150,150);margin-right:15px; float:right;text-decoration:none;font-size: 11px;"><?php echo $textviews ?> <?php echo $MostViewNews['views']?></div>                                                                       
			</div>
		</div>
		<?php }?>
	</div>
	<div style="clear:both"></div>
	</div>
	<div class="bottom_box"><span></span></div>
</div>
<!-- [ends] .MostView-sidebar // -->
<div style="clear:both;"></div>	
<?php } else { ?>
<link rel="stylesheet" type="text/css" href="/css/mostviewnews.css" />
<div id="most_viewed_news">
	<div class="c_navigator" >
		<p class="navi_content"><?php echo $title;?></p>
		<!-- Tạo cây bút chì cho click and change -->
			<div style="float: right; margin-right:5px">
			<?php if(isset($login)&& $login =="1" && isset($permission) && $permission=="true")  {?>
			<ul class="gallery clearfix">	
				<a href="/mostviewnews/clickchange?iframe=true&width=350&height=300" rel="prettyPhoto[iframe]">
					<img src="/images/Pencil.png" style="width:20px ; height:20px;margin-top:10px;"></img>
				</a>
			</ul>
			<?php }?>
			</div>
			
		<!-- End - Tạo cây bút chì cho click and change -->
</div> <!--end c_navigator-->
<div class="most_view_content" style="margin-top:0px; padding: 0px">
		<div class="box_small_top" style="margin:0px; padding: 0px;height:10px"></div>
        <div class="box_small_content " style="height:auto !important;z-index : 101;position:relative;">
            <?php foreach ($AllMostViewNews as $MostViewNews){?>
                <div class="most_view_item" align="center" style="margin-left:10px">
                    <a href="/news/detail?id=<?php echo $MostViewNews['thing_id'];?>"><div style="height:45px;width:55px;float:left" class="image" align="center" ><img width="55px" height="45px" onerror="this.src='/images/img_thumb.gif'" src="<?php if($MostViewNews['avatar'] != null){echo $MostViewNews['avatar'];}else{echo "/images/img_thumb.gif";}?>" /></div></a>
                    <div class="new" >
                    	<a style="font-size: 14px;" href="/news/detail?id=<?php echo $MostViewNews['thing_id'];?>">
                    	<?php 
                    	$kt=strlen($MostViewNews['title']);
								if ($kt<=35)  
									echo $MostViewNews['title']; 
								else 
									echo substr($MostViewNews['title'], 0,35)."..";
									?></a>
									<br/>
									<div style="color:rgb(150,150,150); float:right;text-decoration:none;font-size: 11px;"><?php echo $textviews ?> <?php echo $MostViewNews['views']?> </div>                                                                       
                    </div>
                </div>
            <?php }?>        
        	</div>
        </div>
        <div class="box_small_bottom" style="height:10px;background-position: bottom;margin-right:5px;"></div>
 </div>
 <div style="clear:both"></div>
 <?php } ?>